package com.situ.mall.web.aspect;

import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

//日志的切面类
@Aspect
@Component
public class LogAspect {

    //定义切点
    @Pointcut("execution(* com.situ.mall.web.controller.*.*(..))")
    public void t1() {

    }

    @Pointcut("@annotation(com.situ.mall.web.annotation.MyLog)")
    public void t10(){

    }

    @Before("t10()")
    public void t2() {
        System.out.println("执行方法前");
    }

    @Around("t10()")
    public void t3(){

    }

}
